package com.hyou.sc.eureka.client.auth.module.auth;

import java.io.Serializable;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.hyou.sc.eureka.client.auth.dto.form.AuthForm;
import com.hyou.springboot.annotation.FormValidator;
import com.hyou.springboot.base.ResponseMessage;
import com.hyou.springboot.util.ResponseMessageUtil;

@RestController("authController")
public class AuthController {
    
    private static final Logger log = LoggerFactory.getLogger(AuthController.class);
    
    @FormValidator
    @PostMapping(path = "/auth", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ResponseMessage<Serializable> auth(@RequestBody AuthForm form) {
        log.debug("AuthForm : {}", form);
        
        // TODO
        return ResponseMessageUtil.genSuccessResult();
    }
    
}
